package com.wf.course.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wf.course.dao.ISysRoleMenuMapper;
import com.wf.course.model.user.SysMenu;
import com.wf.course.model.user.SysRoleMenu;
import com.wf.course.service.ISysRoleMenuService;
@Service
@Transactional(rollbackFor=Exception.class)
public class ISysRoleMenuServiceImpl implements ISysRoleMenuService{

	@Autowired
	private ISysRoleMenuMapper ramMapper;
	
	@Override
	public List<SysRoleMenu> queryRoleAndMenu(Integer roleId){
		return this.ramMapper.queryRoleAndMenu(roleId);
	}
	
	@Override
	public void deleteRoleAndMenu(Integer roleId){
		this.ramMapper.deleteRoleAndMenu(roleId);
	}

	@Override
	public void saveRoleAndMenu(SysRoleMenu ram){
		this.ramMapper.saveRoleAndMenu(ram);
	}
	
	@Override
	public List<SysMenu> queryMenuByRoleId(Integer roleId){
		return this.ramMapper.queryMenuByRoleId(roleId);
	}
	
	
}
